﻿using Iot.RealTimeData.RealTimeData;
using Iot.Shared.Path;
using Microsoft.Extensions.Logging;

namespace Iot.RealTimeData.WPF.Prism.ShowValue;

public class ValueFactory(ILogger<ValueFactory> logger) : IOnValueFactory
{
    private ILogger<ValueFactory> Logger { get; } = logger;

    public IOnFloatValue CreateOnFloatValue(DevicePath path)
    {
        return new FloatValue(Logger) { Path = path };
    }

    public IOnEnumValue CreateOnEnumValue(DevicePath path)
    {
        return new EnumValue(Logger) { Path = path };
    }

    public IOnSwitchingValue CreateOnSwitchingValue(DevicePath path)
    {
        return new SwitchingValue(Logger) { Path = path };
    }

    public IOnIntegerValue CreateOnIntegerValue(DevicePath path)
    {
        return new IntegerValue(Logger) { Path = path };
    }
}